package cn.tedu.truetaste.pojo.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

@ApiModel(value = "购物车新增DTO")
@Data
public class ShopAddNewDTO {

    private static final long serialVersionUID = 1L;
    private static final String VALIDATE_MESSAGE_PREFIX = "新增购物车失败，";

    private Long userId;

    /**
     *微信openId
     */
    private String openId;

    /**
     * SKU id
     */
    @ApiModelProperty(value="SKU id",example = "1")
    @NotNull(message = VALIDATE_MESSAGE_PREFIX+"请提供SKUID")
    private Long skuId;

    /**
     *菜品SKU名称
     */
    @ApiModelProperty(value = "菜品SKU名称",example = "火腿肠")
    @NotNull(message = VALIDATE_MESSAGE_PREFIX+"请提供NAME")
    private String name;
    /**
     *菜品SKU图片
     */
    @ApiModelProperty(value="菜品SKU图片URL（第1张）",example = "picture1")
    private String mainPicture;
    /**
     *菜品SKU价格
     */
    @ApiModelProperty(value="菜品SKU单价",example = "99.99")
    @NotNull(message = VALIDATE_MESSAGE_PREFIX+"请提供菜品单价")
    private double price;
    /**
     *菜品购买数量
     */
    @ApiModelProperty(value="菜品SKU购买数量",example = "10")
    @NotNull(message = VALIDATE_MESSAGE_PREFIX+"请提供购买菜品数量")
    private Integer num;

}
